<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>轮回之牢: D:/Code/cProgram/CPP/Qt/TeamCurriculumDesign/Actors/Actor.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">轮回之牢<span id="projectnumber">&#160;0.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_80876d1476b72d92a9650b7ee3516e4c.html">TeamCurriculumDesign</a></li><li class="navelem"><a class="el" href="dir_94d984b25819e36381b125ff1e4ee0f2.html">Actors</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">Actor.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">//</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Created by lenovo on 2021/8/18.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#ifndef TEAMCURRICULUMDESIGN_ACTOR_H</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#define TEAMCURRICULUMDESIGN_ACTOR_H</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &quot;../Utils/Math/Point.h&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;../Utils/Math/Vector.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;../Utils/Math/Common.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;../Item/Weapon/BaseWeapon.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &quot;../Multimedia/Cartoon.h&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="class_actor.html">   18</a></span><span class="keyword">class </span><a class="code hl_class" href="class_actor.html">Actor</a> {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>    <span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;<a class="code hl_function" href="class_actor.html#a2dea4d3df5f9ad75038fee99e820f2e7">getPos</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a93e625a4b49a79b02c7bc35a365210c5">setPos</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;pos_);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#a3b8f6189dfcbd3f5efd9d6437ff2a47e">getWidth</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#aaa95bc73ca018b158432bafd267df8aa">setWidth</a>(<span class="keywordtype">double</span> width_);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#a209f3ce85bf183ac91f637a523308211">getHeight</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#aa39d35feb4a212e7c1a5cad8f5afdd29">setHeight</a>(<span class="keywordtype">double</span> height_);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="class_actor.html#a02d153452eb8ea3dc2e2de666935471f">getHealth</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#ac1b9976a87b36c45c3477ea84ce48f64">setHealth</a>(<span class="keywordtype">int</span> health_);</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="class_actor.html#ad2a0993bd36727f8c1fca81229adee9f">getMaxHealth</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a376906c0882341e0429ebfff529678d8">setMaxHealth</a>(<span class="keywordtype">int</span> maxHealth);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="class_actor.html#a2c6c580cc35219af5988955e30fb1e91">getMagic</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a0cb95a7730ab6862037312ac6854294a">setMagic</a>(<span class="keywordtype">int</span> magic_);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="class_actor.html#a617b9559c0b50cf49ec148a9a932cbf9">getMaxMagic</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a5a7ab69535dea44d4e486009c7f194f4">setMaxMagic</a>(<span class="keywordtype">int</span> maxMagic);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#ab474e98b6994878deb75adf601fb829b">getGravity</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#add5c4d8e6c3ad1442fef5aaa2e7c79a2">setGravity</a>(<span class="keywordtype">double</span> gravity_);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>    <span class="keyword">const</span> <a class="code hl_class" href="class_vector.html">Vector</a> &amp;<a class="code hl_function" href="class_actor.html#aae30d82fc88cd743ad1817ca8433f3e9">getVelocity</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#abea7c3c77f73eb4501db69be7b7123dc">setVelocity</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_vector.html">Vector</a> &amp;velocity_);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#ac6bf16355014a92d0feb17bae987467f">getVelocityXMax</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a84e8665ea31b77b8cf7f8c1f33e2e465">setVelocityXMax</a>(<span class="keywordtype">double</span> velocityXMax);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#a28505a997961eaff9b7580928741d769">getVelocityYMax</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span> </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#ac6799282333780ec6b10b47755b2c9e4">setVelocityYMax</a>(<span class="keywordtype">double</span> velocityYMax);</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="class_actor.html#affb25c5c54721913503e9ec2b55de605">getId</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#a788a6a10dc9d873fd5c87a02a83ab927">getJumpVelocityYMax</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#afff73acb5f0993cff544fafaf3012554">setJumpVelocityYMax</a>(<span class="keywordtype">double</span> jumpVelocityYMax);</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#a1c66efdc540060dd60903b40b968ddfc">getVelocityXReduceRadio</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a97a2bebbcb5fe4fa31829ec3632a82a6">setVelocityXReduceRadio</a>(<span class="keywordtype">double</span> velocityXReduceRadio);</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_actor.html#ad1b0c14d118779ba75f25c538879eb2f">getVelocityYReduceRadio</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#adad38d3b0b2d472de1df311b046c767f">setVelocityYReduceRadio</a>(<span class="keywordtype">double</span> velocityYReduceRadio);</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#ab6916056aa9b881c02b8fa361f633726">doAttackRefreshAndAttack</a>(<span class="keywordtype">bool</span> attack, <span class="keyword">class</span> <a class="code hl_class" href="class_rectangle.html">Rectangle</a> &amp;rec, <span class="keywordtype">int</span> &amp;knock_back_instance, <span class="keywordtype">int</span> &amp;power);</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>    BaseStatus <a class="code hl_function" href="class_actor.html#a5d62464dde4d510d0ad2e740cd86928e">getStatus</a>(<span class="keywordtype">bool</span> onGround, <span class="keywordtype">bool</span> isAttack) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="class_actor.html#afe004ad17dadfee07bc5d43c16f5ce63">  204</a></span>    <span class="keyword">virtual</span> GameObject <a class="code hl_function" href="class_actor.html#afe004ad17dadfee07bc5d43c16f5ce63">getGameObjectType</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span> </div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a0c0ff6a2feb7b06447a8124b7beedf94">attackBy</a>(<span class="keywordtype">int</span> power);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>    std::string id;</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>    <a class="code hl_class" href="class_point.html">Point</a> pos;<span class="comment">//角色当前位置，左下角的顶点</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>    <span class="keywordtype">double</span> width, height;<span class="comment">//角色宽高</span></div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>    <span class="keywordtype">int</span> health;<span class="comment">//角色当前生命值</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span>    <span class="keywordtype">int</span> max_health;<span class="comment">//角色当前最大生命值</span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span>    <span class="keywordtype">int</span> magic;<span class="comment">//角色当前魔法值</span></div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>    <span class="keywordtype">int</span> max_magic;<span class="comment">//角色当前最大魔法值</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>    <span class="keywordtype">double</span> gravity;<span class="comment">//角色所受的重力，单位为像素每平方帧</span></div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span>    <a class="code hl_class" href="class_vector.html">Vector</a> velocity;<span class="comment">//角色在地图内的速度，单位为像素每帧</span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno">  222</span>    <span class="keywordtype">double</span> velocity_x_max;<span class="comment">//角色在水平方向的最大速度</span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span>    <span class="keywordtype">double</span> velocity_y_max;<span class="comment">//角色在竖直方向的最大速度</span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>    <span class="keywordtype">double</span> jump_velocity_y_max;<span class="comment">//跳跃获得的最大竖直速度</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>    <span class="keywordtype">double</span> velocity_x_reduce_radio;<span class="comment">//角色水平速度衰减比率</span></div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span>    <span class="keywordtype">double</span> velocity_y_reduce_radio;<span class="comment">//角色数值速度衰减比率</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno">  227</span>    <span class="keywordtype">double</span> defensive_power = 0.0;<span class="comment">//基础防御力</span></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>    <a class="code hl_class" href="class_base_weapon.html">BaseWeapon</a> *weapon = <span class="keyword">nullptr</span>;<span class="comment">//持有的武器</span></div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>    <span class="keywordtype">int</span> face = 1;</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>    <span class="keywordtype">int</span> getFace() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span> </div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span><span class="comment">//玩家的面向，由x方向速度更新</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span><span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"><a class="line" href="class_actor.html#ad00c0e77802c210e9691977216c245f1">  242</a></span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#ad00c0e77802c210e9691977216c245f1">fixValue</a>(T &amp;value, <span class="keyword">const</span> T &amp;max_value, <span class="keyword">const</span> T &amp;min_value) {</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>        <span class="keywordflow">if</span> (value &gt; max_value) {</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span>            value = max_value;</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (value &lt; min_value) {</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>            value = min_value;</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>        }</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>    }</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span> </div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"><a class="line" href="class_actor.html#aca69a1a886cbf8c0a9ac8998d59bd1ea">  257</a></span>    <span class="keyword">enum</span> <a class="code hl_enumeration" href="class_actor.html#aca69a1a886cbf8c0a9ac8998d59bd1ea">Move_Type_Y</a> {</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>        CLIMB_UP,<span class="comment">//向上攀爬</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span>        CLIMB_DOWN,<span class="comment">//向下攀爬</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>        JUMP,<span class="comment">//跳跃，会脱离攀爬</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span>        NONE_Y,<span class="comment">//不做操作</span></div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno">  262</span>        FORCE_SLOW_DOWN_Y,<span class="comment">//强制减速，仅限修复位置调用</span></div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span>    };</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"><a class="line" href="class_actor.html#a2315aa20cdd86580a3936e58f796289a">  270</a></span>    <span class="keyword">enum</span> <a class="code hl_enumeration" href="class_actor.html#a2315aa20cdd86580a3936e58f796289a">Move_Type_X</a> {</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno">  271</span>        LEFT, RIGHT, NONE_X,</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>    };</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span> </div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"><a class="line" href="struct_actor_1_1_move___type.html">  274</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="struct_actor_1_1_move___type.html">Move_Type</a> {</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>        <a class="code hl_enumeration" href="class_actor.html#a2315aa20cdd86580a3936e58f796289a">Move_Type_X</a> x;</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>        <a class="code hl_enumeration" href="class_actor.html#aca69a1a886cbf8c0a9ac8998d59bd1ea">Move_Type_Y</a> y;</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span>    };</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span>    <span class="keywordtype">bool</span> isClimbing = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span> </div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#a5ea6c36914fd0298237c6f5cba62d72d">moveX</a>(<a class="code hl_enumeration" href="class_actor.html#a2315aa20cdd86580a3936e58f796289a">Actor::Move_Type_X</a> typeX);</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span> </div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#ae4aafa27c1aeab8e2dbb2adeb43848c7">moveY</a>(<a class="code hl_enumeration" href="class_actor.html#aca69a1a886cbf8c0a9ac8998d59bd1ea">Actor::Move_Type_Y</a> typeY, <span class="keywordtype">bool</span> onGround, <span class="keywordtype">bool</span> can_climb);</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno">  294</span> </div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno">  295</span>    <a class="code hl_class" href="class_actor.html">Actor</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;pos, <span class="keyword">const</span> <a class="code hl_class" href="class_vector.html">Vector</a> &amp;velocity, <span class="keywordtype">double</span> width, <span class="keywordtype">double</span> height, <span class="keywordtype">int</span> max_health, <span class="keywordtype">int</span> max_magic,</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span>          <span class="keywordtype">double</span> gravity, <span class="keywordtype">double</span> velocity_x_max, <span class="keywordtype">double</span> velocity_y_max, <span class="keywordtype">double</span> jump_velocity_y_max,</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno">  297</span>          <span class="keywordtype">double</span> velocity_x_reduce_radio, <span class="keywordtype">double</span> velocity_y_reduce_radio);</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span> </div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span>    <a class="code hl_class" href="class_actor.html">Actor</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_actor.html">Actor</a> &amp;other);</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span>    <span class="keyword">virtual</span> <a class="code hl_class" href="class_actor.html">~Actor</a>();</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"><a class="line" href="class_actor.html#a52009a26c35c89419c9b81b1f7933c5f">  306</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="class_actor.html#a52009a26c35c89419c9b81b1f7933c5f">isPlayer</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno">  311</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="class_actor.html#a3ae8d377cd046d2908a3be20022c53ea">isAttackLasting</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno">  312</span> </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="class_actor.html#afae9736661b3b289fd27af8956e42a97">getAttackRange</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span> </div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno">  323</span>    <span class="keyword">const</span> <a class="code hl_class" href="class_base_weapon.html">BaseWeapon</a> *<a class="code hl_function" href="class_actor.html#aa530a5e2363072f7d16b30481984fcf2">getWeapon</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno">  324</span> </div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_actor.html#ac612bf6fac0d250d7ab99a371f799084">normalRefresh</a>();</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span>};</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno">  330</span> </div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno">  331</span> </div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span><span class="preprocessor">#endif </span><span class="comment">//TEAMCURRICULUMDESIGN_ACTOR_H</span></div>
<div class="ttc" id="aclass_actor_html"><div class="ttname"><a href="class_actor.html">Actor</a></div><div class="ttdoc">角色基类</div><div class="ttdef"><b>Definition:</b> Actor.h:18</div></div>
<div class="ttc" id="aclass_actor_html_a02d153452eb8ea3dc2e2de666935471f"><div class="ttname"><a href="class_actor.html#a02d153452eb8ea3dc2e2de666935471f">Actor::getHealth</a></div><div class="ttdeci">int getHealth() const</div><div class="ttdoc">获取体力</div><div class="ttdef"><b>Definition:</b> Actor.cpp:141</div></div>
<div class="ttc" id="aclass_actor_html_a0c0ff6a2feb7b06447a8124b7beedf94"><div class="ttname"><a href="class_actor.html#a0c0ff6a2feb7b06447a8124b7beedf94">Actor::attackBy</a></div><div class="ttdeci">virtual void attackBy(int power)</div><div class="ttdoc">角色被攻击时调用</div><div class="ttdef"><b>Definition:</b> Actor.cpp:309</div></div>
<div class="ttc" id="aclass_actor_html_a0cb95a7730ab6862037312ac6854294a"><div class="ttname"><a href="class_actor.html#a0cb95a7730ab6862037312ac6854294a">Actor::setMagic</a></div><div class="ttdeci">void setMagic(int magic_)</div><div class="ttdoc">设置魔法值，暂时废弃</div><div class="ttdef"><b>Definition:</b> Actor.cpp:161</div></div>
<div class="ttc" id="aclass_actor_html_a1c66efdc540060dd60903b40b968ddfc"><div class="ttname"><a href="class_actor.html#a1c66efdc540060dd60903b40b968ddfc">Actor::getVelocityXReduceRadio</a></div><div class="ttdeci">double getVelocityXReduceRadio() const</div><div class="ttdoc">获取X方向的强制减速因子，当碰撞发生时，首先启用减速因子进行强制减速</div><div class="ttdef"><b>Definition:</b> Actor.cpp:217</div></div>
<div class="ttc" id="aclass_actor_html_a209f3ce85bf183ac91f637a523308211"><div class="ttname"><a href="class_actor.html#a209f3ce85bf183ac91f637a523308211">Actor::getHeight</a></div><div class="ttdeci">double getHeight() const</div><div class="ttdoc">获取高度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:133</div></div>
<div class="ttc" id="aclass_actor_html_a2315aa20cdd86580a3936e58f796289a"><div class="ttname"><a href="class_actor.html#a2315aa20cdd86580a3936e58f796289a">Actor::Move_Type_X</a></div><div class="ttdeci">Move_Type_X</div><div class="ttdoc">角色在水平方向移动的枚举类 LEFT : 向左移动 RIGHT : 向右移动 NONE_X : 水平方向不做出移动</div><div class="ttdef"><b>Definition:</b> Actor.h:270</div></div>
<div class="ttc" id="aclass_actor_html_a28505a997961eaff9b7580928741d769"><div class="ttname"><a href="class_actor.html#a28505a997961eaff9b7580928741d769">Actor::getVelocityYMax</a></div><div class="ttdeci">double getVelocityYMax() const</div><div class="ttdoc">Y方向最大速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:197</div></div>
<div class="ttc" id="aclass_actor_html_a2c6c580cc35219af5988955e30fb1e91"><div class="ttname"><a href="class_actor.html#a2c6c580cc35219af5988955e30fb1e91">Actor::getMagic</a></div><div class="ttdeci">int getMagic() const</div><div class="ttdoc">获取魔法值，暂时废弃</div><div class="ttdef"><b>Definition:</b> Actor.cpp:157</div></div>
<div class="ttc" id="aclass_actor_html_a2dea4d3df5f9ad75038fee99e820f2e7"><div class="ttname"><a href="class_actor.html#a2dea4d3df5f9ad75038fee99e820f2e7">Actor::getPos</a></div><div class="ttdeci">const Point &amp; getPos() const</div><div class="ttdoc">获取位置</div><div class="ttdef"><b>Definition:</b> Actor.cpp:117</div></div>
<div class="ttc" id="aclass_actor_html_a376906c0882341e0429ebfff529678d8"><div class="ttname"><a href="class_actor.html#a376906c0882341e0429ebfff529678d8">Actor::setMaxHealth</a></div><div class="ttdeci">void setMaxHealth(int maxHealth)</div><div class="ttdoc">设置最大体力</div><div class="ttdef"><b>Definition:</b> Actor.cpp:153</div></div>
<div class="ttc" id="aclass_actor_html_a3ae8d377cd046d2908a3be20022c53ea"><div class="ttname"><a href="class_actor.html#a3ae8d377cd046d2908a3be20022c53ea">Actor::isAttackLasting</a></div><div class="ttdeci">bool isAttackLasting() const</div><div class="ttdoc">当前攻击是否持续，攻击动画往往需要播放多帧</div><div class="ttdef"><b>Definition:</b> Actor.cpp:281</div></div>
<div class="ttc" id="aclass_actor_html_a3b8f6189dfcbd3f5efd9d6437ff2a47e"><div class="ttname"><a href="class_actor.html#a3b8f6189dfcbd3f5efd9d6437ff2a47e">Actor::getWidth</a></div><div class="ttdeci">double getWidth() const</div><div class="ttdoc">获取宽度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:125</div></div>
<div class="ttc" id="aclass_actor_html_a52009a26c35c89419c9b81b1f7933c5f"><div class="ttname"><a href="class_actor.html#a52009a26c35c89419c9b81b1f7933c5f">Actor::isPlayer</a></div><div class="ttdeci">virtual bool isPlayer() const =0</div><div class="ttdoc">是否是玩家</div></div>
<div class="ttc" id="aclass_actor_html_a5a7ab69535dea44d4e486009c7f194f4"><div class="ttname"><a href="class_actor.html#a5a7ab69535dea44d4e486009c7f194f4">Actor::setMaxMagic</a></div><div class="ttdeci">void setMaxMagic(int maxMagic)</div><div class="ttdoc">设置最大魔法值，暂时废弃</div><div class="ttdef"><b>Definition:</b> Actor.cpp:169</div></div>
<div class="ttc" id="aclass_actor_html_a5d62464dde4d510d0ad2e740cd86928e"><div class="ttname"><a href="class_actor.html#a5d62464dde4d510d0ad2e740cd86928e">Actor::getStatus</a></div><div class="ttdeci">BaseStatus getStatus(bool onGround, bool isAttack) const</div><div class="ttdoc">获取角色状态</div><div class="ttdef"><b>Definition:</b> Actor.cpp:290</div></div>
<div class="ttc" id="aclass_actor_html_a5ea6c36914fd0298237c6f5cba62d72d"><div class="ttname"><a href="class_actor.html#a5ea6c36914fd0298237c6f5cba62d72d">Actor::moveX</a></div><div class="ttdeci">virtual void moveX(Actor::Move_Type_X typeX)</div><div class="ttdoc">角色沿X方向移动</div><div class="ttdef"><b>Definition:</b> Actor.cpp:12</div></div>
<div class="ttc" id="aclass_actor_html_a617b9559c0b50cf49ec148a9a932cbf9"><div class="ttname"><a href="class_actor.html#a617b9559c0b50cf49ec148a9a932cbf9">Actor::getMaxMagic</a></div><div class="ttdeci">int getMaxMagic() const</div><div class="ttdoc">获取最大魔法值，暂时废弃</div><div class="ttdef"><b>Definition:</b> Actor.cpp:165</div></div>
<div class="ttc" id="aclass_actor_html_a788a6a10dc9d873fd5c87a02a83ab927"><div class="ttname"><a href="class_actor.html#a788a6a10dc9d873fd5c87a02a83ab927">Actor::getJumpVelocityYMax</a></div><div class="ttdeci">double getJumpVelocityYMax() const</div><div class="ttdoc">获取Y方向跳跃最大速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:209</div></div>
<div class="ttc" id="aclass_actor_html_a84e8665ea31b77b8cf7f8c1f33e2e465"><div class="ttname"><a href="class_actor.html#a84e8665ea31b77b8cf7f8c1f33e2e465">Actor::setVelocityXMax</a></div><div class="ttdeci">void setVelocityXMax(double velocityXMax)</div><div class="ttdoc">设置X方向最大速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:193</div></div>
<div class="ttc" id="aclass_actor_html_a93e625a4b49a79b02c7bc35a365210c5"><div class="ttname"><a href="class_actor.html#a93e625a4b49a79b02c7bc35a365210c5">Actor::setPos</a></div><div class="ttdeci">void setPos(const Point &amp;pos_)</div><div class="ttdoc">设置位置</div><div class="ttdef"><b>Definition:</b> Actor.cpp:121</div></div>
<div class="ttc" id="aclass_actor_html_a97a2bebbcb5fe4fa31829ec3632a82a6"><div class="ttname"><a href="class_actor.html#a97a2bebbcb5fe4fa31829ec3632a82a6">Actor::setVelocityXReduceRadio</a></div><div class="ttdeci">void setVelocityXReduceRadio(double velocityXReduceRadio)</div><div class="ttdoc">设置X方向的强制减速因子，当碰撞发生时，首先启用减速因子进行强制减速</div><div class="ttdef"><b>Definition:</b> Actor.cpp:221</div></div>
<div class="ttc" id="aclass_actor_html_aa39d35feb4a212e7c1a5cad8f5afdd29"><div class="ttname"><a href="class_actor.html#aa39d35feb4a212e7c1a5cad8f5afdd29">Actor::setHeight</a></div><div class="ttdeci">void setHeight(double height_)</div><div class="ttdoc">设置高度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:137</div></div>
<div class="ttc" id="aclass_actor_html_aa530a5e2363072f7d16b30481984fcf2"><div class="ttname"><a href="class_actor.html#aa530a5e2363072f7d16b30481984fcf2">Actor::getWeapon</a></div><div class="ttdeci">const BaseWeapon * getWeapon() const</div><div class="ttdoc">获取角色武器的常量指针，参见武器类</div><div class="ttdef"><b>Definition:</b> Actor.cpp:329</div></div>
<div class="ttc" id="aclass_actor_html_aaa95bc73ca018b158432bafd267df8aa"><div class="ttname"><a href="class_actor.html#aaa95bc73ca018b158432bafd267df8aa">Actor::setWidth</a></div><div class="ttdeci">void setWidth(double width_)</div><div class="ttdoc">设置宽度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:129</div></div>
<div class="ttc" id="aclass_actor_html_aae30d82fc88cd743ad1817ca8433f3e9"><div class="ttname"><a href="class_actor.html#aae30d82fc88cd743ad1817ca8433f3e9">Actor::getVelocity</a></div><div class="ttdeci">const Vector &amp; getVelocity() const</div><div class="ttdoc">获取速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:181</div></div>
<div class="ttc" id="aclass_actor_html_ab474e98b6994878deb75adf601fb829b"><div class="ttname"><a href="class_actor.html#ab474e98b6994878deb75adf601fb829b">Actor::getGravity</a></div><div class="ttdeci">double getGravity() const</div><div class="ttdoc">获取重力，单位：像素/（帧 x 帧）</div><div class="ttdef"><b>Definition:</b> Actor.cpp:173</div></div>
<div class="ttc" id="aclass_actor_html_ab6916056aa9b881c02b8fa361f633726"><div class="ttname"><a href="class_actor.html#ab6916056aa9b881c02b8fa361f633726">Actor::doAttackRefreshAndAttack</a></div><div class="ttdeci">virtual void doAttackRefreshAndAttack(bool attack, class Rectangle &amp;rec, int &amp;knock_back_instance, int &amp;power)</div><div class="ttdoc">刷新攻击冷却并根据传入的attack攻击</div><div class="ttdef"><b>Definition:</b> Actor.cpp:245</div></div>
<div class="ttc" id="aclass_actor_html_abea7c3c77f73eb4501db69be7b7123dc"><div class="ttname"><a href="class_actor.html#abea7c3c77f73eb4501db69be7b7123dc">Actor::setVelocity</a></div><div class="ttdeci">void setVelocity(const Vector &amp;velocity_)</div><div class="ttdoc">设置速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:185</div></div>
<div class="ttc" id="aclass_actor_html_ac1b9976a87b36c45c3477ea84ce48f64"><div class="ttname"><a href="class_actor.html#ac1b9976a87b36c45c3477ea84ce48f64">Actor::setHealth</a></div><div class="ttdeci">void setHealth(int health_)</div><div class="ttdoc">设置体力</div><div class="ttdef"><b>Definition:</b> Actor.cpp:145</div></div>
<div class="ttc" id="aclass_actor_html_ac612bf6fac0d250d7ab99a371f799084"><div class="ttname"><a href="class_actor.html#ac612bf6fac0d250d7ab99a371f799084">Actor::normalRefresh</a></div><div class="ttdeci">virtual void normalRefresh()</div><div class="ttdoc">每帧刷新角色时调用</div><div class="ttdef"><b>Definition:</b> Actor.cpp:333</div></div>
<div class="ttc" id="aclass_actor_html_ac6799282333780ec6b10b47755b2c9e4"><div class="ttname"><a href="class_actor.html#ac6799282333780ec6b10b47755b2c9e4">Actor::setVelocityYMax</a></div><div class="ttdeci">void setVelocityYMax(double velocityYMax)</div><div class="ttdoc">设置Y方向最大速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:201</div></div>
<div class="ttc" id="aclass_actor_html_ac6bf16355014a92d0feb17bae987467f"><div class="ttname"><a href="class_actor.html#ac6bf16355014a92d0feb17bae987467f">Actor::getVelocityXMax</a></div><div class="ttdeci">double getVelocityXMax() const</div><div class="ttdoc">X方向最大速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:189</div></div>
<div class="ttc" id="aclass_actor_html_aca69a1a886cbf8c0a9ac8998d59bd1ea"><div class="ttname"><a href="class_actor.html#aca69a1a886cbf8c0a9ac8998d59bd1ea">Actor::Move_Type_Y</a></div><div class="ttdeci">Move_Type_Y</div><div class="ttdoc">角色在竖直方向移动的枚举类 UP : 向上移动或跳跃 DOWN : 向下移动 NONE_Y : 竖直方向不做出移动</div><div class="ttdef"><b>Definition:</b> Actor.h:257</div></div>
<div class="ttc" id="aclass_actor_html_ad00c0e77802c210e9691977216c245f1"><div class="ttname"><a href="class_actor.html#ad00c0e77802c210e9691977216c245f1">Actor::fixValue</a></div><div class="ttdeci">void fixValue(T &amp;value, const T &amp;max_value, const T &amp;min_value)</div><div class="ttdoc">将超出范围的数值进行修正</div><div class="ttdef"><b>Definition:</b> Actor.h:242</div></div>
<div class="ttc" id="aclass_actor_html_ad1b0c14d118779ba75f25c538879eb2f"><div class="ttname"><a href="class_actor.html#ad1b0c14d118779ba75f25c538879eb2f">Actor::getVelocityYReduceRadio</a></div><div class="ttdeci">double getVelocityYReduceRadio() const</div><div class="ttdoc">获取Y方向的强制减速因子，当碰撞发生时，首先启用减速因子进行强制减速</div><div class="ttdef"><b>Definition:</b> Actor.cpp:225</div></div>
<div class="ttc" id="aclass_actor_html_ad2a0993bd36727f8c1fca81229adee9f"><div class="ttname"><a href="class_actor.html#ad2a0993bd36727f8c1fca81229adee9f">Actor::getMaxHealth</a></div><div class="ttdeci">int getMaxHealth() const</div><div class="ttdoc">获取最大体力</div><div class="ttdef"><b>Definition:</b> Actor.cpp:149</div></div>
<div class="ttc" id="aclass_actor_html_adad38d3b0b2d472de1df311b046c767f"><div class="ttname"><a href="class_actor.html#adad38d3b0b2d472de1df311b046c767f">Actor::setVelocityYReduceRadio</a></div><div class="ttdeci">void setVelocityYReduceRadio(double velocityYReduceRadio)</div><div class="ttdoc">设置Y方向的强制减速因子，当碰撞发生时，首先启用减速因子进行强制减速</div><div class="ttdef"><b>Definition:</b> Actor.cpp:229</div></div>
<div class="ttc" id="aclass_actor_html_add5c4d8e6c3ad1442fef5aaa2e7c79a2"><div class="ttname"><a href="class_actor.html#add5c4d8e6c3ad1442fef5aaa2e7c79a2">Actor::setGravity</a></div><div class="ttdeci">void setGravity(double gravity_)</div><div class="ttdoc">设置重力，单位：像素/（帧 x 帧）</div><div class="ttdef"><b>Definition:</b> Actor.cpp:177</div></div>
<div class="ttc" id="aclass_actor_html_ae4aafa27c1aeab8e2dbb2adeb43848c7"><div class="ttname"><a href="class_actor.html#ae4aafa27c1aeab8e2dbb2adeb43848c7">Actor::moveY</a></div><div class="ttdeci">virtual void moveY(Actor::Move_Type_Y typeY, bool onGround, bool can_climb)</div><div class="ttdoc">角色沿Y方向移动</div><div class="ttdef"><b>Definition:</b> Actor.cpp:35</div></div>
<div class="ttc" id="aclass_actor_html_afae9736661b3b289fd27af8956e42a97"><div class="ttname"><a href="class_actor.html#afae9736661b3b289fd27af8956e42a97">Actor::getAttackRange</a></div><div class="ttdeci">int getAttackRange() const</div><div class="ttdoc">获取攻击范围，单位：帧</div><div class="ttdef"><b>Definition:</b> Actor.cpp:321</div></div>
<div class="ttc" id="aclass_actor_html_afe004ad17dadfee07bc5d43c16f5ce63"><div class="ttname"><a href="class_actor.html#afe004ad17dadfee07bc5d43c16f5ce63">Actor::getGameObjectType</a></div><div class="ttdeci">virtual GameObject getGameObjectType() const =0</div><div class="ttdoc">获取角色类型，用于动画和音频</div></div>
<div class="ttc" id="aclass_actor_html_affb25c5c54721913503e9ec2b55de605"><div class="ttname"><a href="class_actor.html#affb25c5c54721913503e9ec2b55de605">Actor::getId</a></div><div class="ttdeci">const std::string &amp; getId() const</div><div class="ttdoc">获取角色id，全局唯一</div><div class="ttdef"><b>Definition:</b> Actor.cpp:205</div></div>
<div class="ttc" id="aclass_actor_html_afff73acb5f0993cff544fafaf3012554"><div class="ttname"><a href="class_actor.html#afff73acb5f0993cff544fafaf3012554">Actor::setJumpVelocityYMax</a></div><div class="ttdeci">void setJumpVelocityYMax(double jumpVelocityYMax)</div><div class="ttdoc">设置Y方向跳跃最大速度</div><div class="ttdef"><b>Definition:</b> Actor.cpp:213</div></div>
<div class="ttc" id="aclass_base_weapon_html"><div class="ttname"><a href="class_base_weapon.html">BaseWeapon</a></div><div class="ttdoc">武器基类</div><div class="ttdef"><b>Definition:</b> BaseWeapon.h:14</div></div>
<div class="ttc" id="aclass_point_html"><div class="ttname"><a href="class_point.html">Point</a></div><div class="ttdoc">二维点</div><div class="ttdef"><b>Definition:</b> Point.h:18</div></div>
<div class="ttc" id="aclass_rectangle_html"><div class="ttname"><a href="class_rectangle.html">Rectangle</a></div><div class="ttdoc">矩形</div><div class="ttdef"><b>Definition:</b> Rectangle.h:13</div></div>
<div class="ttc" id="aclass_vector_html"><div class="ttname"><a href="class_vector.html">Vector</a></div><div class="ttdoc">二维向量</div><div class="ttdef"><b>Definition:</b> Vector.h:17</div></div>
<div class="ttc" id="astruct_actor_1_1_move___type_html"><div class="ttname"><a href="struct_actor_1_1_move___type.html">Actor::Move_Type</a></div><div class="ttdef"><b>Definition:</b> Actor.h:274</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
</small></address>
</body>
</html>
